package com.clear.strategy;

/**
 * 上下文Context
 */
public class Calculator {
    // 客户端持有策略对象
    private Operation operation;

    public void setOperation(Operation operation) {
        this.operation = operation;
    }

    public double executeOperation(double num1, double num2) {
        return operation.execute(num1, num2);
    }
}
